<?php
namespace app\api\model;
use think\Model;

/**
 * Created by PhpStorm.
 * User: muyu
 * Date: 2018/1/25
 * Time: 20:31
 */
class BaseModel extends  Model {
    protected function prefix($val,$data){//属性读取器， url  就是字段
        $finaUrl = $val;
        if($data['from']==1){
            return config('setting.img_prefix').$val;
        }
        return $finaUrl;
    }
}